<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Tools</title>
    <style>
        i {
            display: inline-block;
            margin-left: 50px;
        {#            margin-right: 50px;#} width: 38%;
        }

        i:nth-child(2) {
            margin-left: 10px;
            width: 85px;
        }

        .text {
            width: 38%;
            height: 300px;
            margin-left: 50px;
        }

        .cryptDiv {
            margin-left: 10px;
            display: inline-block;
            width: 80px;
        }
    </style>
</head>
<body>
<form action="/crypt/" method="post" enctype="multipart/form-data">
    {% csrf_token %}
    <div style="margin-left: 50px; margin-bottom: 50px">
        <input type="radio" name="cryptType" value="MD5" {% if cryptType == 'MD5' or cryptType == None %}
               checked
        {% endif %}> MD5
        <input type="radio" name="cryptType" value="SHA1" {% if cryptType == 'SHA1' %}
               checked
        {% endif %}> SHA1
        <input type="radio" name="cryptType" value="SHA256" {% if cryptType == 'SHA256' %}
               checked
        {% endif %}> SHA256
    </div>
    <div>
        <i>originText:</i> <i></i> <i>encryptedText:</i>
        <input class="text" type="text" name="originText" value="{{ originText }}">
        <div class="cryptDiv">
            <input type="radio" name="crypt" value="encrypt" checked> encrypt
            <input type="radio" name="crypt" value="decrypt" disabled> decrypt
        </div>


        <input class="text" type="text" name="encryptedText" value="{{ encryptedText }}">
    </div>
    <input style="margin: 30px auto; display: block; width: 60px; height: 20px" type="submit" value="submit">
</form>
</body>
</html>